package com.xuzili.wechat.config;

import com.xuzili.wechat.servise.WeChatService;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

import javax.annotation.Resource;

/**
 * @author xu
 * @date:2022/8/2122:57
 */
@Configuration
public class CornConfig {
    @Resource
    private WeChatService weChatService;

//    0 30 7 * * ? 每五秒一次
    // 每天早上八点半
    @Scheduled(cron = "0 30 8 * * ?")
    private void getScheduled(){
        weChatService.pushMessage();
    }
}
